import service from "@/utils/request.js"
/**
 * 用户列表
 */
export function userList(data = {}){
    return service.request({
        url: "/api/v1/user/lists",
        method: "post",
        data
    })
}

/**
 * 创建用户
 */
export function userCreate(data = {}){
    return service.request({
        url: "api/v1/user/create",
        method: "post",
        data
    })
}

/**
 * 删除用户
 */
export function userDelete(data = {}){
    return service.request({
        url: "/api/v1/user/remove",
        method: "post",
        data
    })
}
/**
 * 编辑用户
 */
export function userEdit(data = {}){
    return service.request({
        url: "api/v1/user/update",
        method: "post",
        data
    })
}


/**
 * 用户重置密码
 */
export function userPassword(data = {}){
    return service.request({
        url: "/api/v1/user/password",
        method: "post",
        data
    })
}

/**
 * 用户状态
 */
export function userStaus(data = {}){
    return service.request({
        url: "/api/v1/user/status",
        method: "post",
        data
    })
}


/** 设置用户角色
 */
export function userSetRole(data = {}){
    return service.request({
        url: "/api/v1/user/setRole",
        method: "post",
        data
    })
}

/** 获取用户角色
 */
export function userGetRole(data = {}){
    return service.request({
        url: "/api/v1/user/getRole",
        method: "post",
        data
    })
}


/** 获取所在开启状态的用户
 */
export function userGetAll(data = {}){
    return service.request({
        url: "/api/v1/user/all",
        method: "post",
        data
    })
}
